package com.itcncp.ucenter.dao.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.itcncp.common.plugin.ToStringSerializer;

import java.io.Serializable;
import java.util.Date;

public class UserCustomerInfo implements Serializable {
    /**
     * 用户id  =   YYMMDDHHmmssSSS+ 2位随机数
     *
     * @mbg.generated
     */
    @JSONField(serializeUsing= ToStringSerializer.class)
    private Long userId;

    /**
     * 手机号
     *
     * @mbg.generated
     */
    private String mobile;

    /**
     * Token登录有效码
     *
     * @mbg.generated
     */
    private String token;

    /**
     * 登录设备唯一标识码
     *
     * @mbg.generated
     */
    private String deviceAppNo;

    /**
     * 用户类型 1-个人，2-单位
     *
     * @mbg.generated
     */
    private Byte userType;

    /**
     * 客户姓名
     *
     * @mbg.generated
     */
    private String agentName;

    /**
     * 客户证件号类型 
 	1. 身份证   	2. 户口簿   	3. 军官证   	4. 护照（限外籍）   	5. 入境证（限港澳台居民）   	6. 外国人居留证   	7. 组织机构代码证   
 8.     营业执照
     *
     * @mbg.generated
     */
    private Byte agentIdType;

    /**
     * 证件号码
     *
     * @mbg.generated
     */
    private String agentIdNum;

    /**
     * 联系电话，手机号，若用户类型是单位，填写单位指定联系人电话
     *
     * @mbg.generated
     */
    private String agentTel;

    /**
     * 地址，若用户类型是单位，填写单位地址
     *
     * @mbg.generated
     */
    private String agentAddress;

    /**
     * 用户状态(1.正常，2.锁定)
     *
     * @mbg.generated
     */
    private Byte status;

    /**
     * 头像
     *
     * @mbg.generated
     */
    private String head;

    /**
     * 性别
     *
     * @mbg.generated
     */
    private Byte gender;

    /**
     * 扣款方式 1非自动扣款 2自动扣款（不需要密码）
     *
     * @mbg.generated
     */
    private Byte payMethod;

    /**
     * 是否自动开票 1、是 2、否
     *
     * @mbg.generated
     */
    private Byte invoiceAutoFlag;

    /**
     * 发票记录数
     *
     * @mbg.generated
     */
    private Byte invoiceCnt;

    /**
     * 银行卡记录数
     *
     * @mbg.generated
     */
    private Byte bankcardCnt;

    /**
     * 银行卡绑定次数
     *
     * @mbg.generated
     */
    private Byte bankcardBingingCount;

    /**
     * 银行卡绑定日期
     *
     * @mbg.generated
     */
    private Date bankcardBingingDate;

    /**
     * 二维码
     *
     * @mbg.generated
     */
    private String qrcode;

    /**
     * 等级
     *
     * @mbg.generated
     */
    private Byte lv;

    /**
     * 用户昵称
     *
     * @mbg.generated
     */
    private String nickname;

    /**
     * 创建时间
     *
     * @mbg.generated
     */
    private Date createTime;

    /**
     * 修改时间
     *
     * @mbg.generated
     */
    private Date updateTime;

    /**
     * 密码
     *
     * @mbg.generated
     */
    private String password;

    private Double longitude;

    private Double latitude;

    /**
     * 登录方式：1、app；2、小程序
     */
    @JSONField(serialize = false)
    private Byte loginMode;

    @JSONField(serialize = false)
    private String security;

    private static final long serialVersionUID = 1L;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getDeviceAppNo() {
        return deviceAppNo;
    }

    public void setDeviceAppNo(String deviceAppNo) {
        this.deviceAppNo = deviceAppNo;
    }

    public Byte getUserType() {
        return userType;
    }

    public void setUserType(Byte userType) {
        this.userType = userType;
    }

    public String getAgentName() {
        return agentName;
    }

    public void setAgentName(String agentName) {
        this.agentName = agentName;
    }

    public Byte getAgentIdType() {
        return agentIdType;
    }

    public void setAgentIdType(Byte agentIdType) {
        this.agentIdType = agentIdType;
    }

    public String getAgentIdNum() {
        return agentIdNum;
    }

    public void setAgentIdNum(String agentIdNum) {
        this.agentIdNum = agentIdNum;
    }

    public String getAgentTel() {
        return agentTel;
    }

    public void setAgentTel(String agentTel) {
        this.agentTel = agentTel;
    }

    public String getAgentAddress() {
        return agentAddress;
    }

    public void setAgentAddress(String agentAddress) {
        this.agentAddress = agentAddress;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public String getHead() {
        return head;
    }

    public void setHead(String head) {
        this.head = head;
    }

    public Byte getGender() {
        return gender;
    }

    public void setGender(Byte gender) {
        this.gender = gender;
    }

    public Byte getPayMethod() {
        return payMethod;
    }

    public void setPayMethod(Byte payMethod) {
        this.payMethod = payMethod;
    }

    public Byte getInvoiceAutoFlag() {
        return invoiceAutoFlag;
    }

    public void setInvoiceAutoFlag(Byte invoiceAutoFlag) {
        this.invoiceAutoFlag = invoiceAutoFlag;
    }

    public Byte getInvoiceCnt() {
        return invoiceCnt;
    }

    public void setInvoiceCnt(Byte invoiceCnt) {
        this.invoiceCnt = invoiceCnt;
    }

    public Byte getBankcardCnt() {
        return bankcardCnt;
    }

    public void setBankcardCnt(Byte bankcardCnt) {
        this.bankcardCnt = bankcardCnt;
    }

    public Byte getBankcardBingingCount() {
        return bankcardBingingCount;
    }

    public void setBankcardBingingCount(Byte bankcardBingingCount) {
        this.bankcardBingingCount = bankcardBingingCount;
    }

    public Date getBankcardBingingDate() {
        return bankcardBingingDate;
    }

    public void setBankcardBingingDate(Date bankcardBingingDate) {
        this.bankcardBingingDate = bankcardBingingDate;
    }

    public String getQrcode() {
        return qrcode;
    }

    public void setQrcode(String qrcode) {
        this.qrcode = qrcode;
    }

    public Byte getLv() {
        return lv;
    }

    public void setLv(Byte lv) {
        this.lv = lv;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Double getLongitude() {
        return longitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    public Double getLatitude() {
        return latitude;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }


    public Byte getLoginMode() {
        return loginMode;
    }

    public void setLoginMode(Byte loginMode) {
        this.loginMode = loginMode;
    }

    public String getSecurity() {
        return security;
    }

    public void setSecurity(String security) {
        this.security = security;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", userId=").append(userId);
        sb.append(", mobile=").append(mobile);
        sb.append(", token=").append(token);
        sb.append(", deviceAppNo=").append(deviceAppNo);
        sb.append(", userType=").append(userType);
        sb.append(", agentName=").append(agentName);
        sb.append(", agentIdType=").append(agentIdType);
        sb.append(", agentIdNum=").append(agentIdNum);
        sb.append(", agentTel=").append(agentTel);
        sb.append(", agentAddress=").append(agentAddress);
        sb.append(", status=").append(status);
        sb.append(", head=").append(head);
        sb.append(", gender=").append(gender);
        sb.append(", payMethod=").append(payMethod);
        sb.append(", invoiceAutoFlag=").append(invoiceAutoFlag);
        sb.append(", invoiceCnt=").append(invoiceCnt);
        sb.append(", bankcardCnt=").append(bankcardCnt);
        sb.append(", bankcardBingingCount=").append(bankcardBingingCount);
        sb.append(", bankcardBingingDate=").append(bankcardBingingDate);
        sb.append(", qrcode=").append(qrcode);
        sb.append(", lv=").append(lv);
        sb.append(", nickname=").append(nickname);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", password=").append(password);
        sb.append(", longitude=").append(longitude);
        sb.append(", latitude=").append(latitude);
        sb.append(", loginMode=").append(loginMode);
        sb.append(", security=").append(security);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserCustomerInfo other = (UserCustomerInfo) that;
        return (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
                && (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile()))
                && (this.getToken() == null ? other.getToken() == null : this.getToken().equals(other.getToken()))
                && (this.getDeviceAppNo() == null ? other.getDeviceAppNo() == null : this.getDeviceAppNo().equals(other.getDeviceAppNo()))
                && (this.getUserType() == null ? other.getUserType() == null : this.getUserType().equals(other.getUserType()))
                && (this.getAgentName() == null ? other.getAgentName() == null : this.getAgentName().equals(other.getAgentName()))
                && (this.getAgentIdType() == null ? other.getAgentIdType() == null : this.getAgentIdType().equals(other.getAgentIdType()))
                && (this.getAgentIdNum() == null ? other.getAgentIdNum() == null : this.getAgentIdNum().equals(other.getAgentIdNum()))
                && (this.getAgentTel() == null ? other.getAgentTel() == null : this.getAgentTel().equals(other.getAgentTel()))
                && (this.getAgentAddress() == null ? other.getAgentAddress() == null : this.getAgentAddress().equals(other.getAgentAddress()))
                && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
                && (this.getHead() == null ? other.getHead() == null : this.getHead().equals(other.getHead()))
                && (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
                && (this.getPayMethod() == null ? other.getPayMethod() == null : this.getPayMethod().equals(other.getPayMethod()))
                && (this.getInvoiceAutoFlag() == null ? other.getInvoiceAutoFlag() == null : this.getInvoiceAutoFlag().equals(other.getInvoiceAutoFlag()))
                && (this.getInvoiceCnt() == null ? other.getInvoiceCnt() == null : this.getInvoiceCnt().equals(other.getInvoiceCnt()))
                && (this.getBankcardCnt() == null ? other.getBankcardCnt() == null : this.getBankcardCnt().equals(other.getBankcardCnt()))
                && (this.getBankcardBingingCount() == null ? other.getBankcardBingingCount() == null : this.getBankcardBingingCount().equals(other.getBankcardBingingCount()))
                && (this.getBankcardBingingDate() == null ? other.getBankcardBingingDate() == null : this.getBankcardBingingDate().equals(other.getBankcardBingingDate()))
                && (this.getQrcode() == null ? other.getQrcode() == null : this.getQrcode().equals(other.getQrcode()))
                && (this.getLv() == null ? other.getLv() == null : this.getLv().equals(other.getLv()))
                && (this.getNickname() == null ? other.getNickname() == null : this.getNickname().equals(other.getNickname()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
                && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
                && (this.getLongitude() == null ? other.getLongitude() == null : this.getLongitude().equals(other.getLongitude()))
                && (this.getLatitude() == null ? other.getLatitude() == null : this.getLatitude().equals(other.getLatitude()))
                && (this.getLoginMode() == null ? other.getLongitude() == null : this.getLoginMode().equals(other.getLoginMode()))
                && (this.getSecurity() == null ? other.getSecurity() == null : this.getSecurity().equals(other.getSecurity()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode());
        result = prime * result + ((getToken() == null) ? 0 : getToken().hashCode());
        result = prime * result + ((getDeviceAppNo() == null) ? 0 : getDeviceAppNo().hashCode());
        result = prime * result + ((getUserType() == null) ? 0 : getUserType().hashCode());
        result = prime * result + ((getAgentName() == null) ? 0 : getAgentName().hashCode());
        result = prime * result + ((getAgentIdType() == null) ? 0 : getAgentIdType().hashCode());
        result = prime * result + ((getAgentIdNum() == null) ? 0 : getAgentIdNum().hashCode());
        result = prime * result + ((getAgentTel() == null) ? 0 : getAgentTel().hashCode());
        result = prime * result + ((getAgentAddress() == null) ? 0 : getAgentAddress().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getHead() == null) ? 0 : getHead().hashCode());
        result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
        result = prime * result + ((getPayMethod() == null) ? 0 : getPayMethod().hashCode());
        result = prime * result + ((getInvoiceAutoFlag() == null) ? 0 : getInvoiceAutoFlag().hashCode());
        result = prime * result + ((getInvoiceCnt() == null) ? 0 : getInvoiceCnt().hashCode());
        result = prime * result + ((getBankcardCnt() == null) ? 0 : getBankcardCnt().hashCode());
        result = prime * result + ((getBankcardBingingCount() == null) ? 0 : getBankcardBingingCount().hashCode());
        result = prime * result + ((getBankcardBingingDate() == null) ? 0 : getBankcardBingingDate().hashCode());
        result = prime * result + ((getQrcode() == null) ? 0 : getQrcode().hashCode());
        result = prime * result + ((getLv() == null) ? 0 : getLv().hashCode());
        result = prime * result + ((getNickname() == null) ? 0 : getNickname().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getLongitude() == null) ? 0 : getLongitude().hashCode());
        result = prime * result + ((getLatitude() == null) ? 0 : getLatitude().hashCode());
        result = prime * result + ((getLoginMode() == null) ? 0 : getLoginMode().hashCode());
        result = prime * result + ((getSecurity() == null) ? 0 : getSecurity().hashCode());
        return result;
    }
}